
package com.hockeo.client;

import com.google.gwt.user.client.ui.Widget;
import com.hockeo.client.ui.presenters.MainPresenter;
import com.hockeo.client.ui.presenters.NavigationPresenter;
import com.hockeo.client.ui.presenters.StatusPresenter;
import com.hockeo.client.ui.views.MainView;
import com.hockeo.shared.domain.transitory.SessionInfo;
import com.mvp4g.client.annotation.Event;
import com.mvp4g.client.annotation.Events;
import com.mvp4g.client.annotation.Start;
import com.mvp4g.client.event.EventBus;

/**
 * Main event bus (see MVP4G framework for details).
 *
 * @version $Id$
 * @author jjanke
 */
@Events( startView = MainView.class, debug = true )
public interface VHEventBus extends EventBus
{
  @Start
  @Event( handlers = { MainPresenter.class, NavigationPresenter.class, StatusPresenter.class } )
  public void start();

  @Event( handlers = { MainPresenter.class } )
  public void changeTopWidget( Widget w );

  @Event( handlers = { MainPresenter.class } )
  public void changeLeftWidget( Widget w );

  @Event( handlers = { MainPresenter.class } )
  public void changeCenterWidget( Widget w );

  @Event( handlers = { StatusPresenter.class } )
  public void receivedSessionInfo( SessionInfo si );
}
